package org.han.permission.service.impl;

import org.han.base.service.impl.BaseServiceImpl;
import org.han.permission.domain.Permission;
import org.han.permission.mapper.PermissionMapper;
import org.han.permission.service.IPermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PermissionServiceImpl extends BaseServiceImpl<Permission> implements IPermissionService {
    @Resource
    private PermissionMapper mapper;


    @Override
    public List<Permission> tree() {
        return mapper.tree();
    }

    @Override
    public List<String> getUserPermissionSns(Long loginUserId) {
        return mapper.loadPermissionSnsByLoginUserId(loginUserId);
    }
}
